package com.demo.kafka;

import java.util.Arrays;

public class KafakConsumerMain {
    public static void main(String[] args) {
        KafkaSubscriberServer consumerServer2=new KafkaSubscriberServer();
        consumerServer2.setTopics(Arrays.asList("feng"));
        consumerServer2.setAddress("127.0.0.1:9092");
        consumerServer2.setGroupId("feng-group");
        consumerServer2.setAutoCommit(false);
        consumerServer2.setBatchSize(1);
        consumerServer2.setTimeout(100);
        consumerServer2.setKeyDeserializer("org.apache.kafka.common.serialization.StringDeserializer");
        consumerServer2.setValueDeserializer("org.apache.kafka.common.serialization.ByteArrayDeserializer");
        consumerServer2.start();
    }
}
